using System;
using DecisionMaking.Domain;
using System.Collections.Generic;
namespace DecisionMaking.BusinessLogic
{
	public interface IAlgorithmManager
	{
		/// <summary>
		/// Creates or updates the specified algorithm definition in persistent storage 
		/// </summary>
		/// <param name="algorithmDefinition">
		/// A <see cref="AlgorithmDefinition"/>
		/// </param>
		void SaveAlgorithmDefinition(AlgorithmDefinition algorithmDefinition);
		
		AlgorithmDefinition GetAlgorithmDefinition(int id);
		
		/// <summary>
		/// Retrieves a list of all algorithms created by a superuser or the specified account 
		/// </summary>
		/// <param name="accountId">
		/// A <see cref="System.Int32"/>
		/// </param>
		/// <returns>
		/// A <see cref="IList<AlgorithmDefinition>"/>
		/// </returns>
		IList<AlgorithmDefinition> GetAlgorithmDefinitions(int accountId);
		
		/// <summary>
		/// Factory method for creating an IAlgorithm instance for the specified algorithm definition 
		/// </summary>
		/// <param name="algorithmDefinition">
		/// A <see cref="AlgorithmDefinition"/>
		/// </param>
		/// <returns>
		/// A <see cref="IAlgorithm"/>
		/// </returns>
		IAlgorithm GetAlgorithmInstance(AlgorithmDefinition algorithmDefinition);
	}
}

